<!--
@fucntion: 学生信息
-->
<template>
  <div class="module-basic-student">
    <el-row style="height:100%;">
      <el-col style="height:100%;">
        <table-panel :name="'学生信息'" :columns="studentColumns" :tableData="studentData" :showRowNumber="false" :multiSelection="true"
        :canExport="false" :inputLabelSearchMode="true"
        :currentPage="studentCurrentPage" :totalNum="studentTotalNum" @page-change="onPageChange('student',$event)" :pageSize="pageSize"
        @table-searching="onSearching('student',$event)"
        @table-create="onCreate('student',$event)" @table-edit="onEdit('student', $event)"
        @table-delete="onDelete('student',$event)" @table-export="onExport('student',$event)"
        @selection-change="onSelectionChange('student',$event)"></table-panel>
      </el-col>
    </el-row>
  </div>
</template>
<script>
import TablePanel from "@/components/basic/TablePanel";
import {
  formModelInitFromTable,
  formRulesInitFromTable
} from "@/utils/formutils.js";
import { trueFalseRenderer } from "@/utils/tableutils.js";

//meta info
var student = "student"; // 表格名称
var columnsAttr = "Columns"; // 列
var dataAttr = "Data"; // 数据
var selectionAttr = "Selection"; // 选中
var dlgVisibleAttr = "DlgVisible"; // 对话框
var formAttr = "Form";
var recordAttr = "Record"; // 表单模型
var rulesAttr = "Rules"; // 表单验证
var curPageAttr = "CurrentPage";// 分页-当前页
var totalNumAttr = "TotalNum";// 分页-总数
var qParamAttr = "QueryParams";// 查询参数

var studentColumns = [
  {
    prop: "xh",
    label: "学号",
    outOfSearch:true,
    hidden: true
  }
];

export default {
  name:"Student",
  components: {
    "table-panel": TablePanel
  },
  data(){
    return {
      [student + columnsAttr]: studentColumns, // 表格-列
      [student + dataAttr]: [], // 表格的数据
      [student + selectionAttr]: [], // 当前选中
      [student + dlgVisibleAttr]: false, // 对话框是否可见
      [student + recordAttr]: {}, // 表单模型
      [student + rulesAttr]: {},// 表单验证
      [student + curPageAttr]:1,// 当前页
      [student + totalNumAttr]:0,// 总数
      [student + qParamAttr]:{},// 查询参数
      pageSize:20,// 每页数量
      activeFormTab:"basic",
      departmentData:[],
      zzmmData:[],
      imageUrl: ''
    };
  }
}
</script>
<style lang="scss">
.module-basic-student{
  height: 100%;

}
</style>
